.class public Les/ak;
.super Les/bk;
.source "BaiduAdProvider.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/ak$b;
    }
.end annotation


# static fields
.field private static i:Les/ak;

.field private static final j:Ljava/lang/String;


# instance fields
.field private c:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/baidu/mobads/nativecpu/IBasicCPUData;",
            ">;"
        }
    .end annotation
.end field

.field private d:Lcom/baidu/mobads/nativecpu/NativeCPUManager;

.field private e:Landroid/view/animation/Animation;

.field private f:Landroid/view/animation/Animation;

.field private g:Z

.field private h:I


# direct methods
.method static constructor <clinit>()V
    .locals 2

    .line 1
    new-instance v0, Les/ak;

    invoke-direct {v0}, Les/ak;-><init>()V

    sput-object v0, Les/ak;->i:Les/ak;

    .line 2
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v0

    const v1, 0x7f1101b3

    invoke-virtual {v0, v1}, Landroid/app/Application;->getString(I)Ljava/lang/String;

    move-result-object v0

    sput-object v0, Les/ak;->j:Ljava/lang/String;

    return-void
.end method

.method private constructor <init>()V
    .locals 1

    .line 1
    invoke-direct {p0}, Les/bk;-><init>()V

    .line 2
    new-instance v0, Ljava/util/LinkedList;

    invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V

    iput-object v0, p0, Les/ak;->c:Ljava/util/List;

    const/4 v0, 0x1

    .line 3
    iput-boolean v0, p0, Les/ak;->g:Z

    const/4 v0, 0x0

    .line 4
    iput v0, p0, Les/ak;->h:I

    .line 5
    invoke-direct {p0}, Les/ak;->e()V

    return-void
.end method

.method static synthetic a(Les/ak;)Ljava/util/List;
    .locals 0

    .line 1
    iget-object p0, p0, Les/ak;->c:Ljava/util/List;

    return-object p0
.end method

.method static synthetic a(Lcom/baidu/mobads/nativecpu/IBasicCPUData;Les/mk;Landroid/view/View;)V
    .locals 0

    .line 9
    invoke-interface {p0, p1}, Lcom/baidu/mobads/nativecpu/IBasicCPUData;->handleClick(Landroid/view/View;)V

    return-void
.end method

.method static synthetic a(Les/ak;Landroid/content/Context;Landroid/view/ViewGroup;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;)V
    .locals 0

    .line 2
    invoke-direct {p0, p1, p2, p3, p4}, Les/ak;->b(Landroid/content/Context;Landroid/view/ViewGroup;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;)V

    return-void
.end method

.method private a(Les/mk;)V
    .locals 2

    if-eqz p1, :cond_0

    .line 10
    iget-object v0, p0, Les/ak;->f:Landroid/view/animation/Animation;

    iget-object v1, p0, Les/ak;->e:Landroid/view/animation/Animation;

    invoke-virtual {p1, v0, v1}, Les/mk;->a(Landroid/view/animation/Animation;Landroid/view/animation/Animation;)V

    :cond_0
    return-void
.end method

.method private b(Landroid/content/Context;Landroid/view/ViewGroup;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;)V
    .locals 3

    .line 1
    instance-of v0, p1, Landroid/app/Activity;

    const/4 v1, -0x1

    if-eqz v0, :cond_1

    .line 2
    move-object v0, p1

    check-cast v0, Landroid/app/Activity;

    .line 3
    invoke-virtual {v0}, Landroid/app/Activity;->isFinishing()Z

    move-result v2

    if-nez v2, :cond_0

    invoke-virtual {v0}, Landroid/app/Activity;->isDestroyed()Z

    move-result v0

    if-eqz v0, :cond_1

    :cond_0
    const-string p1, "bd-native bad activity"

    .line 4
    invoke-virtual {p0, p3, p4, v1, p1}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    return-void

    .line 5
    :cond_1
    invoke-direct {p0}, Les/ak;->f()Lcom/baidu/mobads/nativecpu/IBasicCPUData;

    move-result-object v0

    if-eqz v0, :cond_4

    if-eqz p2, :cond_4

    .line 6
    instance-of v1, p2, Les/mk;

    if-eqz v1, :cond_2

    .line 7
    move-object p1, p2

    check-cast p1, Les/mk;

    goto :goto_0

    .line 8
    :cond_2
    new-instance v1, Les/mk;

    invoke-direct {v1, p1}, Les/mk;-><init>(Landroid/content/Context;)V

    .line 9
    invoke-virtual {p2}, Landroid/view/ViewGroup;->removeAllViews()V

    .line 10
    invoke-virtual {p2, v1}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V

    move-object p1, v1

    .line 11
    :goto_0
    invoke-virtual {p1, p3}, Les/mk;->setAdType(Lcom/estrongs/android/pop/app/ad/cn/AdType;)V

    .line 12
    invoke-virtual {p1}, Les/mk;->getAdView()Landroid/view/ViewGroup;

    move-result-object v1

    check-cast v1, Les/nk;

    .line 13
    invoke-virtual {v1, v0}, Les/nk;->setItemData(Lcom/baidu/mobads/nativecpu/IBasicCPUData;)V

    .line 14
    new-instance v1, Les/yj;

    invoke-direct {v1, v0, p1}, Les/yj;-><init>(Lcom/baidu/mobads/nativecpu/IBasicCPUData;Les/mk;)V

    invoke-virtual {p1, v1}, Landroid/widget/FrameLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 15
    invoke-virtual {p2}, Landroid/view/ViewGroup;->getVisibility()I

    move-result v1

    if-eqz v1, :cond_3

    const/4 v1, 0x0

    .line 16
    invoke-virtual {p2, v1}, Landroid/view/ViewGroup;->setVisibility(I)V

    .line 17
    :cond_3
    invoke-interface {v0, p1}, Lcom/baidu/mobads/nativecpu/IBasicCPUData;->onImpression(Landroid/view/View;)V

    .line 18
    invoke-virtual {p0, p3, p4, p2}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;Landroid/view/View;)V

    .line 19
    invoke-direct {p0, p1}, Les/ak;->a(Les/mk;)V

    goto :goto_1

    :cond_4
    if-nez v0, :cond_5

    const-string p1, "bd-native no basic"

    .line 20
    invoke-virtual {p0, p3, p4, v1, p1}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    goto :goto_1

    :cond_5
    const-string p1, "bd-native container null"

    .line 21
    invoke-virtual {p0, p3, p4, v1, p1}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    :goto_1
    return-void
.end method

.method private e()V
    .locals 13

    .line 1
    iget-object v0, p0, Les/ak;->f:Landroid/view/animation/Animation;

    const/4 v1, 0x1

    const-wide/16 v2, 0x5dc

    if-nez v0, :cond_0

    .line 2
    new-instance v0, Landroid/view/animation/TranslateAnimation;

    const/4 v5, 0x2

    const/high16 v6, -0x40800000    # -1.0f

    const/4 v7, 0x2

    const/4 v8, 0x0

    const/4 v9, 0x2

    const/4 v10, 0x0

    const/4 v11, 0x2

    const/4 v12, 0x0

    move-object v4, v0

    invoke-direct/range {v4 .. v12}, Landroid/view/animation/TranslateAnimation;-><init>(IFIFIFIF)V

    .line 3
    invoke-virtual {v0, v2, v3}, Landroid/view/animation/Animation;->setDuration(J)V

    .line 4
    invoke-virtual {v0, v1}, Landroid/view/animation/Animation;->setFillAfter(Z)V

    .line 5
    iput-object v0, p0, Les/ak;->f:Landroid/view/animation/Animation;

    .line 6
    :cond_0
    iget-object v0, p0, Les/ak;->e:Landroid/view/animation/Animation;

    if-nez v0, :cond_1

    .line 7
    new-instance v0, Landroid/view/animation/TranslateAnimation;

    const/4 v5, 0x2

    const/4 v6, 0x0

    const/4 v7, 0x2

    const/high16 v8, 0x3f800000    # 1.0f

    const/4 v9, 0x2

    const/4 v10, 0x0

    const/4 v11, 0x2

    const/4 v12, 0x0

    move-object v4, v0

    invoke-direct/range {v4 .. v12}, Landroid/view/animation/TranslateAnimation;-><init>(IFIFIFIF)V

    .line 8
    invoke-virtual {v0, v2, v3}, Landroid/view/animation/Animation;->setDuration(J)V

    .line 9
    invoke-virtual {v0, v1}, Landroid/view/animation/Animation;->setFillAfter(Z)V

    .line 10
    iput-object v0, p0, Les/ak;->e:Landroid/view/animation/Animation;

    :cond_1
    return-void
.end method

.method private f()Lcom/baidu/mobads/nativecpu/IBasicCPUData;
    .locals 2

    .line 1
    iget-object v0, p0, Les/ak;->c:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_0

    .line 2
    iget-object v0, p0, Les/ak;->c:Ljava/util/List;

    const/4 v1, 0x0

    invoke-interface {v0, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/baidu/mobads/nativecpu/IBasicCPUData;

    return-object v0

    :cond_0
    const/4 v0, 0x0

    return-object v0
.end method

.method public static g()Les/ak;
    .locals 1

    .line 1
    sget-object v0, Les/ak;->i:Les/ak;

    return-object v0
.end method

.method private h()V
    .locals 4

    .line 1
    new-instance v0, Lcom/baidu/mobads/nativecpu/CPUAdRequest$Builder;

    invoke-direct {v0}, Lcom/baidu/mobads/nativecpu/CPUAdRequest$Builder;-><init>()V

    const/4 v1, 0x1

    .line 2
    invoke-virtual {v0, v1}, Lcom/baidu/mobads/nativecpu/CPUAdRequest$Builder;->setDownloadAppConfirmPolicy(I)Lcom/baidu/mobads/nativecpu/CPUAdRequest$Builder;

    .line 3
    iget-object v2, p0, Les/ak;->d:Lcom/baidu/mobads/nativecpu/NativeCPUManager;

    invoke-virtual {v0}, Lcom/baidu/mobads/nativecpu/CPUAdRequest$Builder;->build()Lcom/baidu/mobads/nativecpu/CPUAdRequest;

    move-result-object v0

    invoke-virtual {v2, v0}, Lcom/baidu/mobads/nativecpu/NativeCPUManager;->setRequestParameter(Lcom/baidu/mobads/nativecpu/CPUAdRequest;)V

    .line 4
    iget-object v0, p0, Les/ak;->d:Lcom/baidu/mobads/nativecpu/NativeCPUManager;

    const/16 v2, 0x2710

    invoke-virtual {v0, v2}, Lcom/baidu/mobads/nativecpu/NativeCPUManager;->setRequestTimeoutMillis(I)V

    .line 5
    iget-boolean v0, p0, Les/ak;->g:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    iget v0, p0, Les/ak;->h:I

    add-int/2addr v0, v1

    :goto_0
    iput v0, p0, Les/ak;->h:I

    const/16 v2, 0x3e9

    .line 6
    iget-object v3, p0, Les/ak;->d:Lcom/baidu/mobads/nativecpu/NativeCPUManager;

    invoke-virtual {v3, v0, v2, v1}, Lcom/baidu/mobads/nativecpu/NativeCPUManager;->loadAd(IIZ)V

    .line 7
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "load ad pageIndex:"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v1, p0, Les/ak;->h:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "AdManager"

    invoke-static {v1, v0}, Lcom/estrongs/android/util/n;->a(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method private i()V
    .locals 1

    const/4 v0, 0x1

    .line 1
    iput-boolean v0, p0, Les/ak;->g:Z

    .line 2
    invoke-direct {p0}, Les/ak;->h()V

    return-void
.end method


# virtual methods
.method public a(Landroid/app/Activity;Landroid/view/ViewGroup;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;)V
    .locals 0

    const/4 p1, -0x1

    const-string p2, "bd-splash unsupport"

    .line 3
    invoke-virtual {p0, p3, p4, p1, p2}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    return-void
.end method

.method public a(Landroid/app/Activity;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;)V
    .locals 1

    const/4 p1, -0x1

    const-string v0, "bd-insert unsupport"

    .line 11
    invoke-virtual {p0, p2, p3, p1, v0}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    return-void
.end method

.method public a(Landroid/app/Activity;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/h;)V
    .locals 1

    const/4 p1, -0x1

    const-string v0, "bd-reward unsupport"

    .line 12
    invoke-virtual {p0, p2, p3, p1, v0}, Les/bk;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;ILjava/lang/String;)V

    return-void
.end method

.method public a(Landroid/content/Context;Landroid/view/ViewGroup;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;)V
    .locals 10

    .line 4
    iget-object v0, p0, Les/ak;->c:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-nez v0, :cond_0

    .line 5
    new-instance v0, Lcom/baidu/mobads/nativecpu/NativeCPUManager;

    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    sget-object v2, Les/ak;->j:Ljava/lang/String;

    new-instance v9, Les/ak$a;

    move-object v3, v9

    move-object v4, p0

    move-object v5, p1

    move-object v6, p2

    move-object v7, p3

    move-object v8, p4

    invoke-direct/range {v3 .. v8}, Les/ak$a;-><init>(Les/ak;Landroid/content/Context;Landroid/view/ViewGroup;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;)V

    invoke-direct {v0, v1, v2, v9}, Lcom/baidu/mobads/nativecpu/NativeCPUManager;-><init>(Landroid/content/Context;Ljava/lang/String;Lcom/baidu/mobads/nativecpu/NativeCPUManager$CPUAdListener;)V

    iput-object v0, p0, Les/ak;->d:Lcom/baidu/mobads/nativecpu/NativeCPUManager;

    const/16 p1, 0x14

    .line 6
    invoke-virtual {v0, p1}, Lcom/baidu/mobads/nativecpu/NativeCPUManager;->setPageSize(I)V

    .line 7
    invoke-direct {p0}, Les/ak;->i()V

    goto :goto_0

    .line 8
    :cond_0
    invoke-direct {p0, p1, p2, p3, p4}, Les/ak;->b(Landroid/content/Context;Landroid/view/ViewGroup;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;)V

    :goto_0
    return-void
.end method

.method public c()Lcom/estrongs/android/pop/app/ad/cn/AdChannel;
    .locals 1

    .line 1
    sget-object v0, Lcom/estrongs/android/pop/app/ad/cn/AdChannel;->TYPE_BAIDU:Lcom/estrongs/android/pop/app/ad/cn/AdChannel;

    return-object v0
.end method
